package handler

import (
	database "blog/database"
	"blog/handler/model"
	"net/http"

	"github.com/gin-gonic/gin"
)

func RegistUser(ctx *gin.Context) {

	var user model.User
	err:= ctx.ShouldBind(&user)
	if err!=nil {
		ctx.String(http.StatusBadRequest,)
	}

	name := ctx.PostForm("name")
	pass := ctx.PostForm("pass")
	database.CreateUser(name, pass)
}
